home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / netconnect3 / metalweb4.0 / install_metalweb < prev    next >
Text File  |  2000-01-02  |  38KB  |  889 lines

  1. ;******************************************************************************
  2. ;      _   _           __          __    __  __ ______ ____
  3. ;     / \_/ \        _/ /_        / /   / / / // ____// __ \
  4. ;    / \__/ /______ /  __/______ / /   / / / // /_   / /_/ /
  5. ;   / /  / // ____/ / /  / __  // /   / /_/ // __/  / __  /
  6. ;  / /  / // __/_  / /_ / __  // /_  / _   // /___ / /_/ /
  7. ; /_/  /_//_____/ /___//_/ /_//___/ /_/ \_//_____//_____/
  8. ;                         
  9. ; $VER: MetalWEB_Installer 0.71 (December-12-1999) 
  10. ; MetalWEB ©1997-1999 Pedro Luis Mieza <multitaskers@retemail.es>
  11. ; Installer by Robert C. Reiswig ©1999
  12. ;
  13. ; If you wish to use any part of this installer you must ask. May not be 
  14. ; integrated/placed into any other package. You may NOT change this in an way!
  15. ; Changes, suggestions or problems: MetalWEB@vgr.com or rob@vapor.com
  16. ;******************************************************************************
  17.  
  18. ;*Multitas1* (vapor_registration.library)
  19. ;*Multitas1* and (MetalWEB-regiter drawer)
  20. ; *Multitas1* and please change the cpu setups... please now... is Metalweb and Metalweb.020
  21.  
  22. ;*** System Stuff ***
  23. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  24. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  25. (set osver (/ (getversion "LIBS:version.library") 65536))
  26. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  27. (set fastmem (- totmem graphmem))
  28.  
  29. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  30. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  31. (if (= osver 41) (set workbench "3.2"))
  32.  
  33. (set cpu (database "cpu"))
  34. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  35. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  36. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  37. (if (= cpu 68040) (set #cpu 4)) (if (= cpu 68060) (set #cpu 5)) 
  38.  
  39. (set vernum1 (getversion "MetalWEB")) (set ver1 (/ vernum1 65536))
  40. (set rev1 (- vernum1 (* ver1 65536) ) ) (set MetalWEBver (cat ver1 "." rev1))
  41. (if (= ver1 0) (set MetalWEBver "4.0"))
  42.  
  43. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  44. (set lan 0)
  45.  
  46. (if (= "english"    lanfound) (set lan 0))  (if (= "deutsch"    lanfound) (set lan 1))
  47. (set #English    "English")  (set #Deutsch    "Deutsch")
  48.  
  49. (set mfound 0) (set newicon1 1) 
  50. (set keeper 1) (set firsttime 0)
  51.  
  52. ;********************************************************************
  53. ; English Strings
  54. ;********************************************************************
  55.  
  56. (set #about (cat "\n" 
  57.                  "Welcome to "
  58.                  "MetalWEB " MetalWEBver "\n\n"
  59.                  "Copyright ©1997-2000 by\n\nPedro Luis Mieza\n\n"
  60.                  "multitaskers@retemail.es\nor\n"
  61.                  "multitask@vapor.com\n\n"
  62.                  "http://personal3.iddeo.es/multitaskers"
  63.             ) 
  64. )
  65.  
  66. (set #installup " Install or Update MetalWEB")
  67. (set #task "\nWhat would you like to do?\n")
  68. (set #whereMetalWEB "Where do you wish to install MetalWEB. The directory 'MetalWEB' will be created if it is not there. If a copy of MetalWEB is found it will be backed up.")
  69. (set muiver "No Version Installed")
  70. (set #newermui "\nMetalWEB needs version 3.8 or higher of MUI installed to work correctly.\n\nNow would be a good time to Upgrade!\n\nYou can find mui38usr.lha on Aminet in util/libs\n\nIt looks like you have: \n\n")
  71. (set #nomuiarc "\nThe installer could not find the MUI dir in the archive. Because of this the MUI Classes used by MetalWEB were not installed.\n\n If you are Updating MetalWEB then this is not a problem. If it is your first time installing MetalWEB you will need to get an archive with these files.")
  72. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  73. (set #nompc "\nThe .MCC files for MetalWEB can not be installed to 'mui:libs/mui'")
  74. (set #need-os "\n\nMetalWEB needs version 3.0 or higher of the Amiga OS installed to work correctly.\n\n It looks like you have: \n\n")
  75. (set #000used "\n\nThe 68000 version will be installed.") 
  76. (set #nompc "\nThe .MPC files for MetalWEB can not be installed to 'mui:libs/mui'")
  77. (set #noreg1 "\nThe installer could not find 'S:MetalWEB.Key' or '")
  78. (set #noreg2 "' on your system. It also does not seem to be in the archive you are installing MetalWEB from. You may need to get the archive again.\n\nThe installer will now run the Registration Utility, 'Registrationutility'.")   
  79. (set #filethere1 "\n\nThe installer has found MetalWEB version ")
  80. (set #filethere2 " at ")
  81. (set #filethere3 "\n\nThe file will be renamed to ")
  82. (set #filethere4 " and it will then be moved to ")
  83. (set #backuptoXXX "Back-UP to file named 'MetalWEB.")
  84. (set #copyover "Copy Over Old Version")
  85. (set #oktodelete1 "\nIs it ok to delete the older MetalWEB binary so that the MetalWEB Directory can be made?\n")
  86. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ MetalWEB binary so that the MetalWEB Directory can be made?\n")
  87. (set #MetalWEBfound "\nThe Installer has found a copy of MetalWEB already installed. What do you want to do?\n")
  88. (set #no030found "\n\nThe 68030+FPU Version of MetalWEB, V030, was not found in this archive this is why the 68000 version was installed.")
  89. (set #newicon "\nDo you wish to copy over The MetalWEB Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  90. (set #nonewicon  "No  - ToolTypes already set.")
  91. (set #yesnewicon "Yes - Copy over Icon.")
  92. (set #yesnewicon "Yes - Copy over Icon.")
  93. (set #whatcat "\nSelect the MetalWEB Language catalog you wish to install.\n")
  94. (set #wherecat "\nWhere do you wish to install the MetalWEB Language Catalog? Default is ")
  95. (set #catnofind "Can not find this catalog in this MetalWEB archive. You may need to get a newer archive.")
  96. (set #whattools "\nWhat Tools would you like to install? They will be placed in: ")
  97. (set #updatingmuic "\nUpdating the MUI Classes if needed.\n\n(#?.mcc & #?.mcp)")
  98. (set #nomuiarc "\nThe installer could not find the MUI dir in the archive. Because of this the MUI Classes used by MetalWEB were not installed.\n\n If you are Updating MetalWEB then this is not a problem. If it is your first time installing MetalWEB you will need to get an archive with these files.")
  99. (set #whatdocs "\nWhat MetalWEB documentation would you like to install? If an option is not checked it is not in this archive.\n")
  100. (set #wheredocs "Where would you like the MetalWEB documentation you selected to be installed?")
  101. (set #byebye (cat "\nMetalWEB Install Complete!\n\n" ))
  102.  
  103. (set #askcpu "\nWhat version of MetalWEB would you like to install?\n")
  104. (set #noregdir "\nThe Registration directory was not found. This means that the archive has been altered or is bad. Please get another copy of the MetalWEB Archive.\n\nOR\n\nThe Keyfile is missing. Please contact your REG site.")
  105. (set #updatesetpatch "\nThe installer looked for 'c:setpatch' and did not find it or you have a version lower then 40.16. MetalWEB needs version 40.16 to work correctly. You wany want to upgrade soon. (NOTE: if you keep 'setpatch' in a different place than 'c:' and its 40.16 or higher then this message is void.)")
  106. (set #updateinstaller "\nJust to let you know ESCOM AG has released a new version of the installer program.\n\n\nVersion 43.3 can be found on Aminet in:\n\n/util/misc/Installer-43_3.lha\n\n\nYou might want to upgrade soon, if you can.")
  107.  
  108. (set #whatcat "\nSelect the MetalWEB Language catalog you wish to install.\n")
  109. (set #wherecat "\nWhere do you wish to install the MetalWEB Language Catalog? Default is ")
  110. (set #catnofind "Can not find this catalog in this MetalWEB archive. You may need to get the complete archive from the support site.")
  111.  
  112. (set #wantbuttons "\nThe installer has found that the directory 'Images' exist. Do you still wish to install the default Images? If you have created your own you should select 'No'.\n")
  113. (set #yesbutton "Yes, Copy all default images over")
  114. (set #nobuttons "No, Use currently installed images")
  115. (set #onlybutton "Copy only missing and new images")
  116.  
  117. (set #wantrexx "\nThe installer has found that the directory 'rexx' exist. Do you still wish to install the default rexx scripts?\n")
  118. (set #yesrexx "Yes - Copy default rexx scripts over")
  119. (set #norexx "No - Use currently installed rexx scripts")
  120.  
  121. (set #cpuver "\nWhat version of TextInput class would you like to be installed?\n")
  122.  
  123. (set #whatcat "Select the MetalWEB/MetalMAP Language catalog you wish to install.")
  124.  
  125. (set #updatedlibs "\nInstall/Update the Vapor Libraries?\n* = Must be installed to work correctly\n(Click 'Help' for more info on the libs.)\n")
  126. (set #lib1 " Update library (*)")
  127. (set #lib2 " Toolkit library (*)")
  128. (set #lib3 " Registration library")
  129. (set #libhelp1 "vapor_update.library:\nIf installed every Vapor app will automagically check for updates by querying the Vapor server via Internet. You will be informed and offered automatic downloading if there is an update.")
  130. (set #libhelp2 "\n\nvapor_toolkit.library:\nContains support functions which are used by most Vapor applications and thus can be shared to reduce individual application code size. ie: Async I/O library, crytographically strong random number generator, math support.")
  131. (set #libhelp3 "\n\nvapor_registration.library:\nContains the core code for the registration utility\n")
  132. (set #wherelibs "Where do you wish to place the Vapor lib(s), 'Libs:' is default.")
  133. (set #flushing "\n\nTrying to flush old Vapor libraries from memory.")
  134.  
  135. (set #insregstuff " Install Register information")
  136. (set #insregstuffno " Don't Install Register information")
  137. (set #installerreg "\nThe installer did not find an MetalWEB key in the usual places. Do you wish to install the Register information?\n") 
  138.  
  139. (set #libdiff "\nThe installer found one of the Vapor libraries in 'LIBS:' to be a different version than a resident Vapor library (loaded in memory).")
  140. (set #rebootnote  "\n\nNOTE: It is strongly recommended that you reboot, after the installer is finished, to ensure that all updated libraries have been flushed. The libraries may be held open by VaporWare applications or MUI custom classes which are currently running.")
  141. (set #whatverbin "\nWhat version of MetalWEB would you like to install?\n")
  142.  
  143. ;********************************************************************
  144. ; Check Last ENV
  145. ;********************************************************************
  146. (if (> (exists "env:Vapor/MetalWEB_LASTUSEDDIR") 0) 
  147.  (
  148.   (set lastdir (getenv "Vapor/MetalWEB_LASTUSEDDIR"))
  149.   (set lastdirlen (strlen lastdir))
  150.   (set tricklen (+ 1 (strlen (fileonly lastdir))))
  151.   (set lastdir (substr lastdir 0 (- lastdirlen tricklen) ) )
  152.   (if (= 0 (exists lastdir (noreq))) (set lastdir (cat lastdir ":"))) 
  153.  )
  154.  (set lastdir 0)
  155. )
  156.  
  157.  
  158. ;********************************************************************
  159. ; Other Strings
  160. ;********************************************************************
  161. (if (= lan 1) (set Humm TRUE) )
  162.  
  163. ;********************************************************************
  164. ; Check on Setpatch 
  165. ;********************************************************************
  166. (set vernum1 (getversion "c:setpatch")) (set ver1 (/ vernum1 65536)) 
  167. (set rev1 (- vernum1 (* ver1 65536) ) ) (set setpatchver (cat ver1 "." rev1))
  168. (set current_setpatch "40.16")
  169. (if (< setpatchVer current_setpatch) (message #updatesetpatch) )
  170.  
  171. ;********************************************************************
  172. ; Check on New installer 
  173. ;********************************************************************
  174. (set InstallerVer 0)
  175. (set vernum1 @installer-version) (set ver1 (/ vernum1 65536)) 
  176. (set rev1 (- vernum1 (* ver1 65536) ) ) (set InstallerVer (cat ver1 "." rev1))
  177. (set current_installer "43.3")
  178. (if (< InstallerVer current_installer) (message #updateinstaller) )
  179.  
  180.  
  181. ;********************************************************************
  182. ; Hello
  183. ;********************************************************************
  184. (message #about)
  185. (welcome) 
  186.  
  187. ;********************************************************************
  188. ; Checks for MUI & OS versions
  189. ;********************************************************************
  190. (set ver 0)
  191. (if (<> (getassign "mui") "")
  192. (
  193.   (if (exists "mui:mui") 
  194.    (
  195.     (set vernum (getversion "mui:mui") )
  196.     (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  197.    )
  198.   
  199.    (
  200.     (if (exists "sys:prefs/mui") 
  201.      (
  202.        (set vernum (getversion "sys:prefs/mui") )
  203.        (set ver (/ vernum 65536)) (set rev (- vernum (* ver 65536) ) )
  204.      )
  205.     )
  206.    )
  207.   )
  208. )
  209. )
  210.  
  211. (if (= ver 7) (set muiver "2.0") )   (if (= ver 8) (set muiver "2.1") )
  212. (if (= ver 9) (set muiver "2.2") )   (if (= ver 10) (set muiver "2.3") )
  213. (if (= ver 11) (set muiver "3.0") )  (if (= ver 12) (set muiver "3.1") )
  214. (if (= ver 13) (set muiver "3.2") )  (if (= ver 14) (set muiver "3.3") )
  215. (if (= ver 15) (set muiver "3.4") )  (if (= ver 16) (set muiver "3.5") )
  216. (if (= ver 17) (set muiver "3.6") )  (if (= ver 18) (set muiver "3.7") )
  217. (if (= ver 19) (set muiver "3.8") )  (if (= ver 20) (set muiver "3.9") )
  218.  
  219. (if (< ver 18)   ( (message (cat #newermui muiver))   (set cpuPick 0) ))
  220. (if (< osver 37) ( (message (cat #need-os workbench)) (set cpuPick 0) ))
  221.  
  222. ;********************************************************************
  223. ; Ask where to put MetalWEB & Make dir if needed
  224. ;********************************************************************
  225. (set Package (getassign "AmiTCP") )
  226. (if (= Package "") (set Package (getassign "Inet")) )
  227. (if (<> lastdir 0) (set Package lastdir))
  228.  
  229. (set MetalWEBdir  (askdir (prompt #whereMetalWEB)
  230.                 (help   #whereMetalWEB)
  231.                      (default Package)
  232.                )  
  233. )
  234.  
  235. (set where MetalWEBdir)
  236.  
  237. ;********************************************************************
  238. ; Check to see if MetalWEB is already there, if so ask to backup
  239. ;********************************************************************
  240. (if (= 1 (exists (tackon where "MetalWEB") ) ) 
  241.   (
  242.     (set vernum1 (getversion (tackon where "MetalWEB") ))
  243.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  244.     (set MetalWEB_old (cat ver1 "." rev1))
  245.  
  246.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  247.                   (cat "MetalWEB" MetalWEB_old) #filethere4 (tackon MetalWEBdir "MetalWEB") )
  248.     )
  249.  
  250.     (copyfiles (source (tackon where "MetalWEB"))
  251.                (dest where) 
  252.                (infos)
  253.                (newname (cat "MetalWEB." MetalWEB_old))
  254.     )
  255.     
  256.     (delete (tackon MetalWEBdir "MetalWEB") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  257.  
  258.     (if (< (exists (tackon MetalWEBdir "MetalWEB")) 2) (makedir (tackon MetalWEBdir "MetalWEB") (infos)) )    
  259.  
  260.     (copyfiles (source (tackon where (cat "MetalWEB." MetalWEB_old) ))
  261.                        (dest (tackon MetalWEBdir "MetalWEB")) 
  262.                        (infos)
  263.                
  264.     )
  265.  
  266.     (delete (tackon where (cat "MetalWEB" MetalWEB_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  267.  
  268.     ;(set firsttime 1)
  269.  
  270.   )
  271. )
  272.  
  273. (if (< (exists (tackon MetalWEBdir "MetalWEB")) 2) (makedir (tackon MetalWEBdir "MetalWEB") (infos)) )
  274.  
  275. ;********************************************************************
  276. ; copy rooticon if there
  277. ;********************************************************************
  278. (set pathI @icon)  (set pathIlen (strlen pathI))
  279. (set Inamelen (fileonly @icon))
  280. (set Inamelen (+ (strlen Inamelen) 1) )
  281. (set pathI (substr pathI 0 (- pathIlen Inamelen) ) )
  282.  
  283. (if (exists (cat pathI ".info"))
  284.   (copyfiles (source (cat pathI ".info")) (dest (tackon "/" where)) (newname "MetalWEB.info") (optional "nofail") ) 
  285. )
  286.  
  287. (set where (tackon MetalWEBdir "MetalWEB"))
  288. (set @default-dest where)
  289.  
  290. ;********************************************************************
  291. ; Check for old & backup
  292. ;********************************************************************
  293. (if (exists (tackon where "MetalWEB")) 
  294.   (
  295.       (set vernum1 (getversion (tackon where "MetalWEB") ))
  296.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  297.       (set MetalWEB_old (cat ver1 "." rev1))
  298.  
  299.       (set keeper  (askchoice (choices  (cat #backuptoXXX MetalWEB_old "'")  #copyover)
  300.                      (prompt #MetalWEBfound)
  301.                  (help   #MetalWEBfound)
  302.                      (default 0)
  303.                )
  304.       )    
  305.  
  306.       (if (= keeper 0)
  307.          (copyfiles (source (tackon where "MetalWEB"))
  308.                      (dest where) 
  309.                      (infos)
  310.                      (newname (cat "MetalWEB" MetalWEB_old))
  311.          )
  312.       )          
  313.  
  314.       (set firsttime 1)
  315.   )
  316. )
  317.  
  318. ;********************************************************************
  319. ; Copy over correct MetalWEB 
  320. ;********************************************************************
  321. (set filecpu "")
  322. (if (> #cpu 1) (set defcpu 1) (set defcpu 0))
  323.  
  324. (if (exists "MetalWEB.020")
  325.  (
  326.   (set cpuPick (askchoice (choices "68000" "68020")
  327.               (prompt #whatverbin)
  328.                       (help   #whatverbin)
  329.                     (default defcpu)
  330.            )
  331.   )
  332.  
  333.   (if (= cpuPick 1) (set filecpu ".020"))
  334.  
  335.  )
  336. )
  337.  
  338. (copyfiles (source (cat "MetalWEB" filecpu)) (dest where) (optional "nofail") (newname "MetalWEB") )
  339.  
  340. ;********************************************************************
  341. ; Copy over correct MetalWEB Icon if wanted
  342. ;********************************************************************
  343. (if (= firsttime 0)  (copyfiles (source "MetalWEB.info") (dest where) (optional "nofail") ) )
  344.  
  345. (if (OR (= keeper 1) (= (exists (tackon where "MetalWEB.info")) 0))
  346.   (
  347.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  348.                            (prompt #newicon)
  349.                        (help   #newicon)
  350.                            (default 0)
  351.             )
  352.    )
  353.   
  354.    (if (= newicon 0) 
  355.      (copyfiles (source "MetalWEB.info") (dest where)  (optional "nofail") )
  356.    )
  357.   )
  358. )
  359.  
  360. ;********************************************************************
  361. ; Copy over MetalMAP
  362. ;********************************************************************
  363. (if (exists "MetalMAP")
  364.  (copylib (source "MetalMAP") (dest where) (optional "nofail") (infos))
  365.  
  366. ;********************************************************************
  367. ; Ask and and copy rexx if wanted!
  368. ;********************************************************************
  369. (set rexx1 0)
  370.  
  371. (if (> (exists "rexx") 0)
  372.  (
  373.   (if (> (exists (tackon where "rexx")) 0)
  374.    (
  375.      (set rexx1   (askchoice (choices #yesrexx #norexx)            
  376.                              (prompt #wantrexx)
  377.                          (help   #wantrexx)
  378.                              (default 0)
  379.                   )
  380.      )
  381.    )
  382.   )
  383.  
  384.   (if (= rexx1 0)
  385.    (
  386.     (if (< (exists (tackon where "rexx")) 2) (makedir (tackon where "rexx"))  )
  387.     (foreach "rexx" "#?"
  388.       (if (< @each-type 0)
  389.        (copyfiles (source (tackon "rexx" @each-name)) (dest (tackon where "rexx")) (optional "nofail") ) 
  390.       )
  391.     )
  392.    )
  393.   )
  394.  
  395.  ) 
  396. )
  397.  
  398. ;********************************************************************
  399. ; copy Images/#? if there 
  400. ;********************************************************************
  401. (set button 1)
  402.  
  403. (if (> (exists "Images") 0)
  404.  (
  405.   (if (> (exists (tackon where "Images")) 0)
  406.    (
  407.      (set button  (askchoice (choices #onlybutton #yesbutton #nobuttons)            
  408.                              (prompt #wantbuttons)
  409.                          (help   #wantbuttons)
  410.                              (default 0)
  411.                   )
  412.      )
  413.    )
  414.   )
  415.  
  416.   (if (= button 0)
  417.    (
  418.     (if (< (exists (tackon where "Images")) 2) (makedir (tackon where "Images"))  )
  419.  
  420.     (foreach "Images" "#?"
  421.       (if (< @each-type 0)
  422.        (if (exists (tackon (tackon where "Images") @each-name))
  423.          (set Spain 1)      
  424.          (copyfiles (source (tackon "Images" @each-name)) (dest (tackon where "Images")) (optional "nofail") ) 
  425.        )
  426.       )
  427.     )
  428.    )
  429.   )
  430.  
  431.   (if (= button 1)
  432.    (
  433.     (if (< (exists (tackon where "Images")) 2) (makedir (tackon where "Images"))  )
  434.  
  435.     (foreach "Images" "#?"
  436.       (if (< @each-type 0)
  437.        (copyfiles (source (tackon "Images" @each-name)) (dest (tackon where "Images")) (optional "nofail") ) 
  438.       )
  439.     )
  440.    )
  441.   )
  442.  
  443.  ) 
  444. )
  445.  
  446. ;********************************************************************
  447. ; Select and copy over MetalWEB Catalog
  448. ;********************************************************************
  449. (if (> (exists "catalogs") 0) 
  450. (
  451. (set XX 0) (set lan 0)
  452. (foreach "Catalogs" "#?"
  453.  (
  454.   (set XX (+ XX 1)) 
  455.   (textfile (dest (cat "ENV:i.høld." XX)) (append @each-name) ) 
  456.   (if (= lanfound @each-name) (set lan XX))
  457.  
  458.   (if (OR (= (patmatch "#?.c#?" @each-name) 1)  (= (patmatch "#?.read#?" @each-name) 1)) 
  459.      ( (delete (cat "ENV:i.høld." XX)) (set XX (- XX 1))  )
  460.   )
  461.  
  462.  )
  463. )
  464.  
  465. (set l1 "N/A") (set l2 "N/A") (set l3 "N/A") (set l4 "N/A") (set l5 "N/A")
  466. (set l6 "N/A") (set l7 "N/A") (set l8 "N/A") (set l9 "N/A") (set l10 "N/A")
  467. (set l11 "N/A") (set l12 "N/A") (set l13 "N/A") (set l14 "N/A") (set l15 "N/A") 
  468. (set l16 "N/A") (set l17 "N/A") (set l18 "N/A") (set l19 "N/A") (set l20 "N/A") 
  469.  
  470. (set l0 "English")
  471. (if (> (exists ("ENV:i.høld.1")) 0)   (set l1 (getenv "ENV:i.høld.1")) ) (if (> (exists ("ENV:i.høld.2")) 0)   (set l2 (getenv "ENV:i.høld.2")) )
  472. (if (> (exists ("ENV:i.høld.3")) 0)   (set l3 (getenv "ENV:i.høld.3")) ) (if (> (exists ("ENV:i.høld.4")) 0)   (set l4 (getenv "ENV:i.høld.4")) )
  473. (if (> (exists ("ENV:i.høld.5")) 0)   (set l5 (getenv "ENV:i.høld.5")) ) (if (> (exists ("ENV:i.høld.6")) 0)   (set l6 (getenv "ENV:i.høld.6")) )
  474. (if (> (exists ("ENV:i.høld.7")) 0)   (set l7 (getenv "ENV:i.høld.7")) ) (if (> (exists ("ENV:i.høld.8")) 0)   (set l8 (getenv "ENV:i.høld.8")) )
  475. (if (> (exists ("ENV:i.høld.9")) 0)   (set l9 (getenv "ENV:i.høld.9")) ) (if (> (exists ("ENV:i.høld.10")) 0) (set l10 (getenv "ENV:i.høld.10")) )
  476. (if (> (exists ("ENV:i.høld.11")) 0) (set l11 (getenv "ENV:i.høld.11")) )(if (> (exists ("ENV:i.høld.12")) 0) (set l12 (getenv "ENV:i.høld.12")) )
  477. (if (> (exists ("ENV:i.høld.12")) 0) (set l13 (getenv "ENV:i.høld.13")) )(if (> (exists ("ENV:i.høld.14")) 0) (set l14 (getenv "ENV:i.høld.14")) )
  478. (if (> (exists ("ENV:i.høld.15")) 0) (set l15 (getenv "ENV:i.høld.15")) )(if (> (exists ("ENV:i.høld.16")) 0) (set l16 (getenv "ENV:i.høld.16")) )
  479. (if (> (exists ("ENV:i.høld.17")) 0) (set l17 (getenv "ENV:i.høld.17")) )(if (> (exists ("ENV:i.høld.18")) 0) (set l18 (getenv "ENV:i.høld.18")) )
  480. (if (> (exists ("ENV:i.høld.19")) 0) (set l19 (getenv "ENV:i.høld.19")) )(if (> (exists ("ENV:i.høld.20")) 0) (set l20 (getenv "ENV:i.høld.20")) )
  481. (run "delete env:i.høld.#?")
  482.  
  483. (set catalog (askchoice (choices l0 l1) ; l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l17 l18 l19)            
  484.                         (prompt #whatcat)
  485.                     (help   #whatcat)
  486.                         (default lan)
  487.              )
  488. )
  489.  
  490. (if (= catalog 0)  (set #lcat l0))  
  491. (if (= catalog 1)  (set #lcat l1))  (if (= catalog 2)  (set #lcat l2))  (if (= catalog 3)  (set #lcat l3))  
  492. (if (= catalog 4)  (set #lcat l4))  (if (= catalog 5)  (set #lcat l5))  (if (= catalog 5)  (set #lcat l5))
  493. (if (= catalog 6)  (set #lcat l6))  (if (= catalog 7)  (set #lcat l7))  (if (= catalog 8)  (set #lcat l8))  
  494. (if (= catalog 9)  (set #lcat l9))  (if (= catalog 10) (set #lcat l10)) (if (= catalog 11) (set #lcat l11))
  495. (if (= catalog 12) (set #lcat l12)) (if (= catalog 13) (set #lcat l13)) (if (= catalog 14) (set #lcat l14)) 
  496. (if (= catalog 15) (set #lcat l15)) (if (= catalog 16) (set #lcat l16)) (if (= catalog 17) (set #lcat l17))
  497. (if (= catalog 18) (set #lcat l18)) (if (= catalog 19) (set #lcat l19)) (if (= catalog 20) (set #lcat l20))
  498.  
  499. (if (AND (<> catalog 0) (<> #lcat "N/A"))
  500.  (
  501.   (if (> (exists (cat "Catalogs/" #lcat "/metalweb.catalog")) 0)
  502.     (
  503.         (set wherecat  (askchoice (choices (tackon where (cat "Catalogs/" #lcat)) (cat "Locale:Catalogs/" #lcat) )
  504.                                   (prompt (cat #wherecat (tackon where (cat "Catalogs/" #lcat)) "\n"))
  505.                             (help   #wherecat)
  506.                                (default 0)
  507.                        )  
  508.         )
  509.  
  510.       (if (= wherecat 1)
  511.         (
  512.          (if (< (exists "Locale:") 2) ( (makedir "sys:Locale") (makeassign "Locale" "sys:Locale") ) )
  513.          (if (< (exists "Locale:Catalogs") 2) (makedir "sys:Locale/Catalogs") )
  514.          (if (< (exists (cat "Locale:Catalogs/" #lcat)) 2) (makedir (cat "sys:Locale/Catalogs/" #lcat)) )
  515.          (copylib (source (cat "Catalogs/" #lcat "/metalweb.catalog")) (dest (cat "sys:Locale/Catalogs/" #lcat)) )
  516.          (copylib (source (cat "Catalogs/" #lcat "/metalmap.catalog")) (dest (cat "sys:Locale/Catalogs/" #lcat)) )
  517.         )
  518.   
  519.         (
  520.          (if (< (exists (tackon where "Catalogs")) 2) (makedir (tackon where "Catalogs")) )
  521.          (if (< (exists (tackon where (cat "Catalogs/" #lcat)) ) 2) (makedir (tackon where (cat "Catalogs/" #lcat)) ) )
  522.          (copylib (source (cat "Catalogs/" #lcat "/metalweb.catalog")) (dest (tackon where (cat "Catalogs/" #lcat)) ) (optional "nofail") )
  523.          (copylib (source (cat "Catalogs/" #lcat "/metalmap.catalog")) (dest (tackon where (cat "Catalogs/" #lcat)) ) (optional "nofail") )
  524.          (if (exists "Catalogs.info")
  525.            (copyfiles (source "Catalogs.info") (dest where) (optional "nofail") ) 
  526.          )
  527.         )
  528.       )
  529.  
  530.     )
  531.  
  532.     (message (cat "\nCatalogs/" #lcat "/metalweb.catalog or metalmap.catalog\n\n" #catnofind))
  533.   )
  534.  
  535.  )
  536. )
  537. ); End if Catalog dir
  538. ); 
  539.  
  540. ;********************************************************************
  541. ; Ask and and copy docs if wanted!
  542. ;********************************************************************
  543. (set nodocs 0)
  544.  
  545. (set defdocs 0)
  546. (if (exists "MetalWEB.readme") (set defdocs (+ defdocs 1)) )
  547. (if (exists "Docs/MetalWEB")   (set defdocs (+ defdocs 2)) )
  548. (if (exists "Docs/MetalMAP")   (set defdocs (+ defdocs 4)) )
  549.  
  550. (set docs (askoptions (choices " MetalWEB.readme" " MetalWEB Docs (HTML format)" " MetalMap Docs (HTML format)")
  551.               (prompt #whatdocs)
  552.                       (help #whatdocs)
  553.                   (default defdocs)
  554.       )
  555. )
  556.  
  557. (set #wantlangdocs "\nWhat version of the MetalWEB Docs do you wish to install?\n")
  558.  
  559. (if (<> docs 0)
  560.  (
  561.    (set docsdir (askdir (prompt #wheredocs)
  562.                (help   #wheredocs)
  563.                     (default where)
  564.                 )  
  565.    )
  566.  
  567.    (if (IN docs 0)
  568.     (copyfiles (source "MetalWEB.readme") (dest docsdir) (infos) (optional "nofail") )
  569.    )
  570.  
  571.    (if (AND (IN docs 1) (exists "Docs/MetalWEB") )
  572.     (
  573.       (if (< (exists (tackon docsdir "Docs")) 2) (makedir (tackon docsdir "Docs") (infos)) )    
  574.       (if (< (exists (tackon docsdir "Docs/MetalWEB")) 2) (makedir (tackon docsdir "Docs/MetalWEB") (infos)) )    
  575.       (if (< (exists (tackon docsdir "Docs/MetalWEB/images")) 2) (makedir (tackon docsdir "Docs/MetalWEB/images") (infos)) )    
  576.       (if (exists "Docs.info") (copyfiles (source "Docs.info") (dest docsdir) (optional "nofail") )  )
  577.       (if (exists "Docs/MetalWEB.info") (copyfiles (source "Docs/MetalWEB.info") (dest (tackon docsdir "MetalWEB")) (optional "nofail") )  )
  578.  
  579.       (set guesslang 0)
  580.       (if (= @language "español") (set guesslang 1))
  581.  
  582.       (set lang_docs         (askchoice (choices " English" " Español")            
  583.                               (prompt #wantlangdocs)
  584.                           (help   #wantlangdocs)
  585.                               (default guesslang)
  586.                    )
  587.       )
  588.  
  589.       (if (= lang_docs 0) (set lang_dir "English"))  (if (= lang_docs 1) (set lang_dir "Español"))
  590.  
  591.       (if (exists (tackon "Docs/MetalWEB" lang_dir))
  592.         (foreach (tackon "Docs/MetalWEB" lang_dir) "#?.html"
  593.            (copyfiles (source (tackon (tackon "Docs/MetalWEB" lang_dir) @each-name)) (dest (tackon docsdir "Docs/MetalWEB")) (optional "nofail") ) 
  594.         )
  595.       )
  596.  
  597.       (if (exists (tackon (tackon "Docs/MetalWEB" lang_dir) "images"))
  598.         (foreach (tackon (tackon "Docs/MetalWEB" lang_dir) "images")"#?"
  599.           (copyfiles (source (tackon (tackon (tackon "Docs/MetalWEB" lang_dir) "images") @each-name)) (dest (tackon docsdir "Docs/MetalWEB/images")) (optional "nofail") ) 
  600.         )
  601.       )
  602.     )
  603.    )
  604.  
  605.    (if (AND (IN docs 2)  (exists "Docs/MetalMAP") )
  606.     (
  607.       (if (< (exists (tackon docsdir "Docs")) 2) (makedir (tackon docsdir "Docs") (infos)) )    
  608.       (if (< (exists (tackon docsdir "Docs/MetalMap")) 2) (makedir (tackon docsdir "Docs/MetalMap") (infos)) )    
  609.       (if (< (exists (tackon docsdir "Docs/MetalMap/images")) 2) (makedir (tackon docsdir "Docs/MetalMap/images") (infos)) )    
  610.       (if (exists "Docs.info") (copyfiles (source "Docs.info") (dest docsdir) (optional "nofail") )  )
  611.       (if (exists "Docs/MetalMap.info") (copyfiles (source "Docs/MetalMap.info") (dest (tackon docsdir "MetalMap")) (optional "nofail") )  )
  612.  
  613.       (if (exists "Docs/MetalMap")
  614.         (foreach "Docs/MetalMap" "#?.html"
  615.            (copyfiles (source (tackon "Docs/MetalMap" @each-name)) (dest (tackon docsdir "Docs/MetalMap")) (optional "nofail") ) 
  616.         )
  617.       )
  618.  
  619.       (if (exists "Docs/MetalMap/images")
  620.         (foreach "Docs/MetalMap/images" "#?"
  621.           (copyfiles (source (tackon "Docs/MetalMap/images" @each-name)) (dest (tackon docsdir "Docs/MetalMap/images")) (optional "nofail") ) 
  622.         )
  623.       )
  624.     )
  625.    )
  626.  
  627.  
  628.  )
  629. )
  630.  
  631. ;********************************************************************
  632. ; Copy update Lib if wanted 
  633. ;********************************************************************
  634. (set deflibs 15)
  635. (if (> (exists "libs") 0)
  636.  (
  637.   (set deflibs 0)
  638.   (if (> (exists (tackon "libs" "vapor_update.library")) 0)       (set deflibs (+ deflibs 1)))
  639.   (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)      (set deflibs (+ deflibs 2)))
  640.   (if (> (exists (tackon "libs" "vapor_registration.library")) 0) (set deflibs (+ deflibs 4)))
  641.   (if (> (exists (tackon "libs" "CManager.library")) 0)           (set deflibs (+ deflibs 8)))
  642.  
  643.   (set libPick (askoptions (choices #lib1 #lib2 #lib3)
  644.               (prompt #updatedlibs)
  645.                       (help   (cat #libhelp1 #libhelp2 #libhelp3))
  646.                     (default deflibs)
  647.            )
  648.   )
  649.  
  650.   (if (> libPick 0)
  651.    (
  652.     (set wherelibs (askdir (prompt #wherelibs)
  653.                   (help   #wherelibs)
  654.                        (default "LIBS:")
  655.                    )  
  656.     )
  657.     
  658.     (if (IN libPick 0)
  659.      (if (> (exists (tackon "libs" "vapor_update.library")) 0)
  660.       (copylib (source (tackon "libs" "vapor_update.library")) (dest wherelibs) (optional "nofail"))  
  661.      )
  662.     )
  663.  
  664.     (if (IN libPick 1)
  665.      (if (> (exists (tackon "libs" "vapor_toolkit.library")) 0)
  666.       (copylib (source (tackon "libs" "vapor_toolkit.library")) (dest wherelibs) (optional "nofail"))  
  667.      )
  668.     )
  669.  
  670.     (if (IN libPick 2)
  671.      (if (> (exists (tackon "libs" "vapor_registration.library")) 0)
  672.       (copylib (source (tackon "libs" "vapor_registration.library")) (dest wherelibs) (optional "nofail"))  
  673.      )
  674.     )
  675.  
  676.    ;(working #flushing) (run "avail flush > NIL:") (run "avail flush > NIL:") (run "avail flush > NIL:")
  677.  
  678.    ; Run David's flushlib if there - 0=ok , 20=FlushFail
  679.     (if (exists "flushlib")
  680.      (run "flushlib QUIET vapor_#?.library")
  681.     )
  682.    
  683.  
  684.    )
  685.  
  686.   )
  687.  )
  688. )
  689.  
  690. ;********************************************************************
  691. ; Check version of libs resident VS in libs: then note reboot
  692. ;********************************************************************
  693. (if (> (exists "libs") 0)
  694.  (
  695.   (set lib_localdir "Libs:")
  696.  
  697.   (procedure checkversion
  698.    (set vernum1 (getversion (tackon lib_localdir ver_checkfile)))
  699.    (set ver1 (/ vernum1 65536))  (set rev1 (- vernum1 (* ver1 65536) ) )
  700.    (set ver_result (cat ver1 "." rev1))
  701.   )
  702.   (procedure checkversionR
  703.    (set vernum1 (getversion (tackon lib_localdir ver_checkfile) (resident)))
  704.    (set ver1 (/ vernum1 65536))  (set rev1 (- vernum1 (* ver1 65536) ) )
  705.    (set ver_result (cat ver1 "." rev1))
  706.   )
  707.  
  708.   (set ver_checkfile "vapor_toolkit.library") (checkversion) (set toolkit_ver ver_result)
  709.   (set ver_checkfile "vapor_update.library") (checkversion) (set update_ver ver_result)
  710.   (set ver_checkfile "vapor_registration.library") (checkversion) (set reg_ver ver_result)
  711.  
  712.   (if (= toolkit_ver "0.0") (set toolkit_ver "None"))
  713.   (if (= update_ver "0.0") (set update_ver "None"))
  714.   (if (= reg_ver "0.0") (set reg_ver "None"))
  715.  
  716.   (set lib_localdir "")
  717.   (set ver_checkfile "vapor_toolkit.library") (checkversionR) (set toolkit_verR ver_result)
  718.   (set ver_checkfile "vapor_update.library") (checkversionR) (set update_verR ver_result)
  719.   (set ver_checkfile "vapor_registration.library") (checkversionR) (set reg_verR ver_result)
  720.  
  721.   (if (= toolkit_verR "0.0") (set toolkit_verR "None"))
  722.   (if (= update_verR "0.0") (set update_verR "None"))
  723.   (if (= reg_verR "0.0") (set reg_verR "None"))
  724.  
  725.   (set #verchecklib (cat "Vapor Library Version Check\n------------------------------------\n"
  726.                          "vapor_toolkit.library\nIn 'LIBS:' " toolkit_ver " (In memory: " toolkit_verR ")" 
  727.                          "\n\nvapor_update.library\nIn 'LIBS:' " update_ver " (In memory: " update_verR ")" 
  728.                          "\n\nvapor_registration.library\nIn 'LIBS:' " reg_ver " (In memory: " reg_verR ")"
  729.                     ) 
  730.   )
  731.   
  732.   (set libdiff 0)
  733.   (if (<> toolkit_ver toolkit_verR) (set libdiff 1)) 
  734.   (if (<> update_ver update_verR)   (set libdiff 1))
  735.   ;(if (<> reg_ver reg_verR)         (set libdiff 1)) 
  736.  
  737.   (if (= libdiff 1)
  738.    (
  739.     (message #verchecklib)
  740.     (message (cat #libdiff #rebootnote))
  741.    )
  742.   )
  743.  
  744.  )
  745. )
  746.  
  747.  
  748. ;********************************************************************
  749. ; Copy over #?.mpc|#?.mcc (Need to be in mui:libs/mui)
  750. ;********************************************************************
  751. ;Check for MUI stuff in 'Libs' or 'MUI/Libs'
  752.  (if (exists "Libs/MUI") (set mui_localdir "Libs/MUI"))
  753.  (if (exists "MUI") (set mui_localdir "MUI"))
  754.  
  755. (if (> #cpu 1) (set guesscpu 1) (set guesscpu 0)) 
  756.  
  757. (if (<> (getassign "mui") "")
  758. (
  759.   (if (> (exists "mui:libs/mui") 0) 
  760.    (
  761.  
  762.     (if (> (exists (tackon mui_localdir "Textinput.mcc.020")) 0)
  763.       (set whatver (askchoice (choices  "68000" "68020")
  764.                       (prompt #cpuver)
  765.                   (help   #cpuver)
  766.                       (default guesscpu)
  767.                )
  768.       )
  769.     )
  770.  
  771.     (working #updatingmuic)
  772.     (foreach mui_localdir "#?.mcp"
  773.       (if (AND (= whatver 1) (exists (cat (tackon mui_localdir @each-name) ".020") ) )
  774.         (copylib (source (cat (tackon mui_localdir @each-name) ".020")) (dest "mui:libs/mui") (newname @each-name) (optional "nofail") ) 
  775.         (copylib (source (tackon mui_localdir @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  776.       )
  777.     )
  778.  
  779.     (foreach mui_localdir "#?.mcc"
  780.        (if (AND (= whatver 1) (exists (cat (tackon mui_localdir @each-name) ".020") ) )
  781.         (copylib (source (cat (tackon mui_localdir @each-name) ".020")) (dest "mui:libs/mui") (newname @each-name) (optional "nofail") ) 
  782.         (copylib (source (tackon mui_localdir @each-name)) (dest "mui:libs/mui") (optional "nofail") ) 
  783.        )  
  784.     )
  785.    )
  786.  
  787.    (message (cat #newermui muiver #nompc)) 
  788.   )
  789. )
  790. )
  791.  
  792. ;********************************************************************
  793. ; copy keyfile if there 
  794. ;********************************************************************
  795. (if (> (exists "MetalWEB.key") 0)
  796.  (copyfiles (source "MetalWEB.key") (dest where) (infos) (optional "nofail") ) 
  797. )
  798.  
  799. ;********************************************************************
  800. ; Reg stuff Register-MetalWEB
  801. ;********************************************************************
  802. (procedure checkforkey
  803.  (set foundkey 0) 
  804.  (set kc "MetalWEB.key")
  805.  
  806.  (if (exists kc (noreq)) (set foundkey 1) )
  807.  (if (exists (tackon where kc) (noreq)) (set foundkey 1) )
  808.  (if (exists (tackon "s:" kc) (noreq)) (set foundkey 1) )
  809.  (if (exists (tackon "l:" kc) (noreq)) (set foundkey 1) )
  810.  (if (exists (tackon "libs:" kc) (noreq)) (set foundkey 1) )
  811.  (if (exists (tackon "keypath:" kc) (noreq)) (set foundkey 1) )
  812.  (if (exists (tackon "keyfiles:" kc) (noreq)) (set foundkey 1) )
  813.  
  814.  (if (= foundkey 0)
  815.   (set wantkey (askchoice  (choices #insregstuffno #insregstuff)
  816.                        (prompt #installerreg)
  817.                            (help #installerreg)
  818.                        (default 1)
  819.                )
  820.   )
  821.  
  822.   (set wantkey 0)
  823.  )
  824. )
  825.  
  826. (checkforkey)
  827.  
  828. (if (AND (exists "Register-MetalWEB") (= wantkey 1))
  829.  (
  830.   (if (< (exists (tackon where "Register-MetalWEB")) 2) (makedir (tackon where "Register-MetalWEB") (infos)) )    
  831.   (if (exists "Register-MetalWEB.info")
  832.     (copyfiles (source "Register-MetalWEB.info") (dest where) (optional "nofail") ) 
  833.   )
  834.   (set whereR (tackon where "Register-MetalWEB"))
  835.  
  836.  
  837.   (set whatreg  (askchoice (choices "English"  "Deutsch" "Francais" )
  838.                            (prompt "What Registration Files (Language) would you like to install?")
  839.                        (help   "What Registration Files (Language) would you like to install?")
  840.                         (default 0)
  841.                 )  
  842.   )
  843.  
  844.   (if (= whatreg 0) ((set basereg "English")  (set baseregTT "English") ) )
  845.   (if (= whatreg 1) ((set basereg "Deutsch")  (set baseregTT "Deutsch") ) )
  846.   (if (= whatreg 2) ((set basereg "Francais") (set baseregTT "French")  ) )
  847.  
  848.   (if (exists "Register-MetalWEB/RegistrationUtility") 
  849.     (copyfiles (source "Register-MetalWEB/RegistrationUtility")
  850.                (dest whereR)
  851.                (infos)
  852.     )
  853.   )
  854.  
  855.   ;(if (exists (tackon "Register-MetalWEB" (cat "Regtool-" basereg ".info")) )
  856.   ;  (copyfiles (source (tackon "Register-MetalWEB" (cat "Regtool-" basereg ".info")) )
  857.   ;             (dest whereR) 
  858.   ;             (newname "RegistrationUtility.info")
  859.   ;  )
  860.   ;)
  861.  
  862.   (if (exists (tackon "Register-MetalWEB" (cat "Reg_" basereg ".guide")) ) 
  863.     (copyfiles (source (tackon "Register-MetalWEB" (cat "Reg_" basereg ".guide")))
  864.                (dest whereR) 
  865.                (infos)
  866.     )
  867.   )
  868.  
  869.   (if (exists (tackon "Register-MetalWEB" (cat "Reg_" basereg ".doc")) )
  870.     (copyfiles (source (tackon "Register-MetalWEB" (cat "Reg_" basereg ".doc")))
  871.                (dest whereR) 
  872.                (infos)
  873.     )
  874.   )
  875.  
  876.  
  877.  )
  878. )
  879.  
  880. ;********************************************************************
  881. ; End Bye 
  882. ;********************************************************************
  883. (if (> (exists ("c:multiview")) 0) (set #mpath "c:") )
  884. (if (> (exists ("sys:Utilities/multiview")) 0) (set #mpath "sys:Utilities") )
  885.  
  886. (run (cat "run " #mpath "/multiview History") )
  887. (exit (quiet) #byebye)
  888.